﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace DartDetectorTest1.Detector
{
	/// <summary>
	/// The class that calculates the dartScore
	/// </summary>
	public class RandomScore : IDartDetector
	{
		/// <summary>
		/// New dart detected event
		/// </summary>
		public event DartDetectionEventHandler DartDetected;
		
		/// <summary>
		/// Number of cameras
		/// </summary>
		public int Cameras { get; set; }
		
		/// <summary>
		/// contructor
		/// </summary>
		public RandomScore() : this(0) { }
		/// <summary>
		/// contructor
		/// </summary>
		/// <param name="cameras"></param>
		public RandomScore(int cameras)
		{
			this.Cameras = cameras;
		}

		/// <summary>
		/// Process a frame from one of the video sources
		/// </summary>
		/// <param name="image"></param>
		/// <param name="videoSource"></param>
		public void ProcessFrame(ref Bitmap image, int videoSource)
		{
			
			
			
			// random shizzle!
			Random r = new Random();
			if(this.DartDetected != null && r.Next(5) == 1)
			{
				this.DartDetected(this, r.Next(180));
			}
		}
	}
}
